# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :upload_files_page.py
# @Time      :2023/11/10 10:44
# @Author    :WangXiang

from selenium.webdriver.common.by import By
from pages.base_page import BasePage

class UploadFilePage(BasePage):

    USER = (By.XPATH, "/html/body/div[1]/div/div[2]/div[2]/div/div[2]/form/div[1]/div/div[1]/input")
    PASS = (By.XPATH, "/html/body/div[1]/div/div[2]/div[2]/div/div[2]/form/div[2]/div/div[1]/input")
    LOGINBUTTON = (By.CSS_SELECTOR, ".el-button.el-button--primary.login-btn.primary-bj")

    LOGINSUCCESS = (By.XPATH, "/html/body/div[1]/div[1]/div[2]/div/div[3]/div/div[1]/div[1]/button[1]/span")

    MYSPACE_01 = (By.XPATH, "/html/body/div[1]/div[1]/div[1]/div[1]/div[2]/div[7]/div[1]/div[2]")
    MYSPACE_02 = (By.XPATH, "/html/body/div[1]/div[1]/div[1]/div[1]/div[2]/div[7]/div[2]/a[1]")

    UPLOADBUTTON = (By.XPATH, "/html/body/div[1]/div[1]/div[2]/div[2]/div[2]/div[2]/div[1]/div[1]/div[2]/button[4]")


    INPUT = (By.CSS_SELECTOR, "input[type='file']")

    FILESBUTTON = (By.XPATH, '/html/body/div[1]/div[1]/div[2]/div[2]/div[2]/div[2]/div[1]/div[1]/div[2]/div[2]/div/div/div/div[2]/div/div/div[1]/span')

    FOLDERBUTTON = (By.XPATH, "/html/body/div[1]/div[1]/div[2]/div[2]/div[2]/div[2]/div[1]/div[1]/div[2]/div[2]/div/div/div/div[2]/div/div/div[2]/span")

    # 进入企业
    JINRU_QIYE = (By.XPATH, "/html/body/div/div[1]/div[4]/div/div/div[2]/button")

    # 上传进度
    # UPLOAD_JINDU = (By.XPATH, "/html/body/div[1]/div[1]/div[2]/div[2]/div[4]/div[2]/div[1]/div[1]/div/div[1]")
    UPLOAD_JINDU = (By.XPATH, "/html/body/div[1]/div[1]/div[2]/div[2]/div[4]/div[2]/div[1]/div[1]/div/div[2]")
    CLOSE_UPLOD = (By.CLASS_NAME, "uploader-close")

    # 验证文件是否存在

    FILE_NO = (By.XPATH, "/html/body/div[10]/div/div[2]/div/div[2]")

    # 保留两者
    SAVE_TWO = (By.XPATH, "/html/body/div[10]/div/div[2]/div/div[2]/div/div/div[1]/div/div/div/button[3]")

    SUBMIT = (By.XPATH, "//label[2]/input")